/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jifTenencias.java
 *
 * Created on 17/03/2011, 04:44:41 PM
 */

package TenenciaForm;



import UtilidadesTenencias.Acciones_Tenencias;
import bd_tenencias.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.RollbackException;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.jdesktop.application.Action;
import org.jdesktop.application.Task;
import org.jdesktop.beansbinding.AbstractBindingListener;
import org.jdesktop.beansbinding.Binding;
import org.jdesktop.beansbinding.PropertyStateEvent;

/**
 *
 * @author Earving
 */
public class jifTenencias extends javax.swing.JInternalFrame {

    private boolean n = false, n2 = false, n3 = false;
    private String idAuto, idTarjeta; private Acciones_Tenencias at = new Acciones_Tenencias();

    /** Creates new form jifTenencias */
    public jifTenencias() {
        initComponents();
        initListenersPaciente();
        initListenersAuto();
        initListenersTenencia();
        validadorNumeros(txtTelefono);
        validadorNumeros(txtAnio);
        comboboxIndex();
        panelesVisibles();
        botonesHabilitados();
        emTenencias.getTransaction().begin();
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class).getContext().getResourceMap(jifTenencias.class);
        emTenencias = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(resourceMap.getString("emTenencias.persistenceUnit")).createEntityManager(); // NOI18N
        queryPropietarios = java.beans.Beans.isDesignTime() ? null : emTenencias.createQuery(resourceMap.getString("queryPropietarios.query")); // NOI18N
        listPropietarios = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryPropietarios.getResultList());
        queryAutos = java.beans.Beans.isDesignTime() ? null : emTenencias.createQuery(resourceMap.getString("queryAutos.query")); // NOI18N
        listAutos = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryAutos.getResultList());
        generosQuery = java.beans.Beans.isDesignTime() ? null : emTenencias.createQuery("SELECT g FROM Generos g");
        generosList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : generosQuery.getResultList();
        queryTenencias = java.beans.Beans.isDesignTime() ? null : emTenencias.createQuery(resourceMap.getString("queryTenencias.query")); // NOI18N
        listTenencias = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryTenencias.getResultList());
        renderGeneros1 = new Utilidades.RenderGeneros();
        rendererGenerosPropietarios1 = new UtilidadesTenencias.RendererGenerosPropietarios();
        renderPropietarioAuto1 = new UtilidadesTenencias.RenderPropietarioAuto();
        renderAutomovil1 = new UtilidadesTenencias.RenderAutomovil();
        txtIdTenencia = new javax.swing.JTextField();
        txtIdTarjeta = new javax.swing.JTextField();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jpPropietarios = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtPropietarios = new javax.swing.JTable();
        jpDatosPropietario = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txtDireccion = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        txtTelefono = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        cboGeneros = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        cboPropietarioAuto = new javax.swing.JComboBox();
        jpAccionesPropietario = new javax.swing.JPanel();
        btnEliminarPropietario = new javax.swing.JButton();
        btnGuardarPropietario = new javax.swing.JButton();
        btnRefreshPropietario = new javax.swing.JButton();
        btnAgregarPropietario = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtAutomoviles = new javax.swing.JTable();
        jpDatosAuto = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        txtAnio = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtPuertas = new javax.swing.JTextField();
        txtCilindro = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        txtSerie = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        txtMotor = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        cboPropietariosAuto = new javax.swing.JComboBox();
        jPanel4 = new javax.swing.JPanel();
        btnAgregarAuto = new javax.swing.JButton();
        btnEliminarAuto = new javax.swing.JButton();
        btnGuardarAuto = new javax.swing.JButton();
        btnRefreshAuto = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel7 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        cboAutosRegistrados = new javax.swing.JComboBox();
        jLabel16 = new javax.swing.JLabel();
        cboTTT = new javax.swing.JComboBox();
        jLabel17 = new javax.swing.JLabel();
        txtPrecioAutoTenencia = new javax.swing.JTextField();
        jpDatosNuevaTenencia = new javax.swing.JPanel();
        cbExcentoTenenciaNueva = new javax.swing.JCheckBox();
        jLabel18 = new javax.swing.JLabel();
        txtNuevoAdeudo = new javax.swing.JTextField();
        jpCostoNuevaTenencia = new javax.swing.JPanel();
        jLabel19 = new javax.swing.JLabel();
        jdcNuevaFechaPago = new com.toedter.calendar.JDateChooser();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        txtNuevoCosto = new javax.swing.JTextField();
        txtNuevoDescuento = new javax.swing.JTextField();
        jPanel12 = new javax.swing.JPanel();
        btnNuevaTenencia = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtTenencias = new javax.swing.JTable();
        jpDatosTenencia = new javax.swing.JPanel();
        cbExcento = new javax.swing.JCheckBox();
        jLabel12 = new javax.swing.JLabel();
        txtAdeudo = new javax.swing.JTextField();
        jpCostoTenencia = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jdFechaPago = new com.toedter.calendar.JDateChooser();
        txtCosto = new javax.swing.JTextField();
        txtDescuento = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        btnEliminarTenencia = new javax.swing.JButton();
        btnGuardarTenencia = new javax.swing.JButton();
        btnRefreshTenencia = new javax.swing.JButton();
        cboTenenciaAuto = new javax.swing.JComboBox();
        jpTarjeta = new javax.swing.JPanel();
        cboTarjeta = new javax.swing.JComboBox();
        jLabel24 = new javax.swing.JLabel();
        jdcVig_Fin = new com.toedter.calendar.JDateChooser();
        jLabel25 = new javax.swing.JLabel();
        jdcVig_ini = new com.toedter.calendar.JDateChooser();
        btnAgregarTarjeta = new javax.swing.JButton();
        btnEliminartarjeta = new javax.swing.JButton();
        btnActualizarTarjeta = new javax.swing.JButton();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        cboTenenciaProp = new javax.swing.JComboBox();

        renderGeneros1.setText(resourceMap.getString("renderGeneros1.text")); // NOI18N
        renderGeneros1.setName("renderGeneros1"); // NOI18N

        rendererGenerosPropietarios1.setText(resourceMap.getString("rendererGenerosPropietarios1.text")); // NOI18N
        rendererGenerosPropietarios1.setName("rendererGenerosPropietarios1"); // NOI18N

        renderPropietarioAuto1.setText(resourceMap.getString("renderPropietarioAuto1.text")); // NOI18N
        renderPropietarioAuto1.setName("renderPropietarioAuto1"); // NOI18N

        renderAutomovil1.setText(resourceMap.getString("renderAutomovil1.text")); // NOI18N
        renderAutomovil1.setName("renderAutomovil1"); // NOI18N

        txtIdTenencia.setName("txtIdTenencia"); // NOI18N

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.idTenencia}"), txtIdTenencia, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        txtIdTarjeta.setName("txtIdTarjeta"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboTarjeta, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.idTarjetacirc}"), txtIdTarjeta, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        setClosable(true);
        setResizable(true);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setFrameIcon(resourceMap.getIcon("Form.frameIcon")); // NOI18N
        setName("Form"); // NOI18N

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jpPropietarios.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpPropietarios.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpPropietarios.border.titleFont"))); // NOI18N
        jpPropietarios.setName("jpPropietarios"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jtPropietarios.setName("jtPropietarios"); // NOI18N

        org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPropietarios, jtPropietarios);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombre}"));
        columnBinding.setColumnName("Nombre");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${app}"));
        columnBinding.setColumnName("App");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apm}"));
        columnBinding.setColumnName("Apm");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane1.setViewportView(jtPropietarios);
        jtPropietarios.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jtPropietarios.columnModel.title0")); // NOI18N
        jtPropietarios.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jtPropietarios.columnModel.title1")); // NOI18N
        jtPropietarios.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jtPropietarios.columnModel.title2")); // NOI18N

        javax.swing.GroupLayout jpPropietariosLayout = new javax.swing.GroupLayout(jpPropietarios);
        jpPropietarios.setLayout(jpPropietariosLayout);
        jpPropietariosLayout.setHorizontalGroup(
            jpPropietariosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpPropietariosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 353, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jpPropietariosLayout.setVerticalGroup(
            jpPropietariosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpPropietariosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jpDatosPropietario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpDatosPropietario.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpDatosPropietario.border.titleFont"))); // NOI18N
        jpDatosPropietario.setName("jpDatosPropietario"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        txtDireccion.setName("txtDireccion"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPropietarios, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.direccion}"), txtDireccion, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        txtTelefono.setName("txtTelefono"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPropietarios, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.telefono}"), txtTelefono, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        cboGeneros.setName("cboGeneros"); // NOI18N
        cboGeneros.setRenderer(rendererGenerosPropietarios1);

        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, generosList, cboGeneros);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPropietarios, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.generos}"), cboGeneros, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        cboPropietarioAuto.setName("cboPropietarioAuto"); // NOI18N
        cboPropietarioAuto.setRenderer(renderAutomovil1);

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedElement.autoList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPropietarios, eLProperty, cboPropietarioAuto);
        bindingGroup.addBinding(jComboBoxBinding);

        javax.swing.GroupLayout jpDatosPropietarioLayout = new javax.swing.GroupLayout(jpDatosPropietario);
        jpDatosPropietario.setLayout(jpDatosPropietarioLayout);
        jpDatosPropietarioLayout.setHorizontalGroup(
            jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosPropietarioLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDatosPropietarioLayout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(83, 83, 83)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboGeneros, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpDatosPropietarioLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(6, 6, 6)
                        .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(37, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpDatosPropietarioLayout.createSequentialGroup()
                .addContainerGap(166, Short.MAX_VALUE)
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cboPropietarioAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25))
        );
        jpDatosPropietarioLayout.setVerticalGroup(
            jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosPropietarioLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cboGeneros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addGroup(jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel1)
                        .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(47, 47, 47)
                .addGroup(jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpDatosPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(cboPropietarioAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(93, Short.MAX_VALUE))
        );

        jpAccionesPropietario.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpAccionesPropietario.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpAccionesPropietario.border.titleFont"))); // NOI18N
        jpAccionesPropietario.setName("jpAccionesPropietario"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class).getContext().getActionMap(jifTenencias.class, this);
        btnEliminarPropietario.setAction(actionMap.get("eliminarPropieatario")); // NOI18N
        btnEliminarPropietario.setText(resourceMap.getString("btnEliminarPropietario.text")); // NOI18N
        btnEliminarPropietario.setName("btnEliminarPropietario"); // NOI18N

        btnGuardarPropietario.setAction(actionMap.get("guardarPropietario")); // NOI18N
        btnGuardarPropietario.setText(resourceMap.getString("btnGuardarPropietario.text")); // NOI18N
        btnGuardarPropietario.setName("btnGuardarPropietario"); // NOI18N

        btnRefreshPropietario.setAction(actionMap.get("refreshPropietario")); // NOI18N
        btnRefreshPropietario.setText(resourceMap.getString("btnRefreshPropietario.text")); // NOI18N
        btnRefreshPropietario.setName("btnRefreshPropietario"); // NOI18N

        btnAgregarPropietario.setAction(actionMap.get("agregarPropietario")); // NOI18N
        btnAgregarPropietario.setText(resourceMap.getString("btnAgregarPropietario.text")); // NOI18N
        btnAgregarPropietario.setName("btnAgregarPropietario"); // NOI18N

        javax.swing.GroupLayout jpAccionesPropietarioLayout = new javax.swing.GroupLayout(jpAccionesPropietario);
        jpAccionesPropietario.setLayout(jpAccionesPropietarioLayout);
        jpAccionesPropietarioLayout.setHorizontalGroup(
            jpAccionesPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpAccionesPropietarioLayout.createSequentialGroup()
                .addGroup(jpAccionesPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpAccionesPropietarioLayout.createSequentialGroup()
                        .addGap(47, 47, 47)
                        .addComponent(btnGuardarPropietario))
                    .addGroup(jpAccionesPropietarioLayout.createSequentialGroup()
                        .addGap(66, 66, 66)
                        .addGroup(jpAccionesPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnAgregarPropietario)
                            .addComponent(btnEliminarPropietario))))
                .addContainerGap(49, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpAccionesPropietarioLayout.createSequentialGroup()
                .addContainerGap(73, Short.MAX_VALUE)
                .addComponent(btnRefreshPropietario)
                .addGap(67, 67, 67))
        );
        jpAccionesPropietarioLayout.setVerticalGroup(
            jpAccionesPropietarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpAccionesPropietarioLayout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(btnAgregarPropietario)
                .addGap(18, 18, 18)
                .addComponent(btnEliminarPropietario)
                .addGap(18, 18, 18)
                .addComponent(btnGuardarPropietario)
                .addGap(18, 18, 18)
                .addComponent(btnRefreshPropietario)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jpPropietarios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jpDatosPropietario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
                .addComponent(jpAccionesPropietario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(73, 73, 73))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jpPropietarios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jpDatosPropietario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(97, 97, 97)
                        .addComponent(jpAccionesPropietario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(90, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel3.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel3.border.titleFont"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jtAutomoviles.setName("jtAutomoviles"); // NOI18N

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listAutos, jtAutomoviles);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${placa}"));
        columnBinding.setColumnName("Placa");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${marca}"));
        columnBinding.setColumnName("Marca");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${modelo}"));
        columnBinding.setColumnName("Modelo");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${tipo}"));
        columnBinding.setColumnName("Tipo");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${color}"));
        columnBinding.setColumnName("Color");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${combustible}"));
        columnBinding.setColumnName("Combustible");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${procedencia}"));
        columnBinding.setColumnName("Procedencia");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane2.setViewportView(jtAutomoviles);
        jtAutomoviles.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title4")); // NOI18N
        jtAutomoviles.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title0")); // NOI18N
        jtAutomoviles.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title1")); // NOI18N
        jtAutomoviles.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title6")); // NOI18N
        jtAutomoviles.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title2")); // NOI18N
        jtAutomoviles.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title3")); // NOI18N
        jtAutomoviles.getColumnModel().getColumn(6).setHeaderValue(resourceMap.getString("jtAutomoviles.columnModel.title5")); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 659, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jpDatosAuto.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpDatosAuto.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpDatosAuto.border.titleFont"))); // NOI18N
        jpDatosAuto.setName("jpDatosAuto"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        txtAnio.setName("txtAnio"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.anio}"), txtAnio, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        txtPuertas.setName("txtPuertas"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.numPuertas}"), txtPuertas, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        txtCilindro.setName("txtCilindro"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.numCilindros}"), txtCilindro, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jTextField1.setName("jTextField1"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.precio}"), jTextField1, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        txtSerie.setName("txtSerie"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.numSerie}"), txtSerie, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        txtMotor.setName("txtMotor"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.numMotor}"), txtMotor, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        cboPropietariosAuto.setName("cboPropietariosAuto"); // NOI18N
        cboPropietariosAuto.setRenderer(renderPropietarioAuto1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPropietarios, cboPropietariosAuto);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtAutomoviles, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.propietario}"), cboPropietariosAuto, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout jpDatosAutoLayout = new javax.swing.GroupLayout(jpDatosAuto);
        jpDatosAuto.setLayout(jpDatosAutoLayout);
        jpDatosAutoLayout.setHorizontalGroup(
            jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosAutoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDatosAutoLayout.createSequentialGroup()
                        .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jpDatosAutoLayout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtAnio, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(jpDatosAutoLayout.createSequentialGroup()
                                    .addComponent(jLabel6)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(txtPuertas, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jpDatosAutoLayout.createSequentialGroup()
                                    .addComponent(jLabel5)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(txtCilindro, 0, 0, Short.MAX_VALUE))))
                        .addGap(25, 25, 25)
                        .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jpDatosAutoLayout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtMotor, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
                            .addGroup(jpDatosAutoLayout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jpDatosAutoLayout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtSerie, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(116, 116, 116))
                    .addGroup(jpDatosAutoLayout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboPropietariosAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        jpDatosAutoLayout.setVerticalGroup(
            jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpDatosAutoLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(cboPropietariosAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(txtAnio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDatosAutoLayout.createSequentialGroup()
                        .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(txtPuertas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8)
                            .addComponent(txtSerie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(27, 27, 27)
                        .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(txtCilindro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jpDatosAutoLayout.createSequentialGroup()
                        .addGap(38, 38, 38)
                        .addGroup(jpDatosAutoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(txtMotor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel4.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel4.border.titleFont"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        btnAgregarAuto.setAction(actionMap.get("agregarAuto")); // NOI18N
        btnAgregarAuto.setText(resourceMap.getString("btnAgregarAuto.text")); // NOI18N
        btnAgregarAuto.setName("btnAgregarAuto"); // NOI18N

        btnEliminarAuto.setAction(actionMap.get("eliminarAuto")); // NOI18N
        btnEliminarAuto.setText(resourceMap.getString("btnEliminarAuto.text")); // NOI18N
        btnEliminarAuto.setName("btnEliminarAuto"); // NOI18N

        btnGuardarAuto.setAction(actionMap.get("guardarAuto")); // NOI18N
        btnGuardarAuto.setText(resourceMap.getString("btnGuardarAuto.text")); // NOI18N
        btnGuardarAuto.setName("btnGuardarAuto"); // NOI18N

        btnRefreshAuto.setAction(actionMap.get("refreshAuto")); // NOI18N
        btnRefreshAuto.setText(resourceMap.getString("btnRefreshAuto.text")); // NOI18N
        btnRefreshAuto.setName("btnRefreshAuto"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnRefreshAuto)
                            .addComponent(btnEliminarAuto)
                            .addComponent(btnAgregarAuto)))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(36, 36, 36)
                        .addComponent(btnGuardarAuto)))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(btnAgregarAuto)
                .addGap(18, 18, 18)
                .addComponent(btnEliminarAuto)
                .addGap(18, 18, 18)
                .addComponent(btnGuardarAuto)
                .addGap(18, 18, 18)
                .addComponent(btnRefreshAuto)
                .addContainerGap(47, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jpDatosAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(109, 109, 109)
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(59, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jpDatosAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(126, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel5.setName("jPanel5"); // NOI18N

        jTabbedPane2.setName("jTabbedPane2"); // NOI18N

        jPanel7.setName("jPanel7"); // NOI18N

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel10.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel10.border.titleFont"))); // NOI18N
        jPanel10.setName("jPanel10"); // NOI18N

        cboAutosRegistrados.setName("cboAutosRegistrados"); // NOI18N
        cboAutosRegistrados.setRenderer(renderAutomovil1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listAutos, cboAutosRegistrados);
        bindingGroup.addBinding(jComboBoxBinding);

        cboAutosRegistrados.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cboAutosRegistradosItemStateChanged(evt);
            }
        });

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        cboTTT.setEnabled(false);
        cboTTT.setName("cboTTT"); // NOI18N
        cboTTT.setRenderer(renderPropietarioAuto1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPropietarios, cboTTT);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboAutosRegistrados, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.propietario}"), cboTTT, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        txtPrecioAutoTenencia.setEnabled(false);
        txtPrecioAutoTenencia.setName("txtPrecioAutoTenencia"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboAutosRegistrados, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.precio}"), txtPrecioAutoTenencia, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cboAutosRegistrados, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboTTT, 0, 157, Short.MAX_VALUE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtPrecioAutoTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cboAutosRegistrados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(cboTTT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(txtPrecioAutoTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jpDatosNuevaTenencia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpDatosNuevaTenencia.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpDatosNuevaTenencia.border.titleFont"))); // NOI18N
        jpDatosNuevaTenencia.setName("jpDatosNuevaTenencia"); // NOI18N

        cbExcentoTenenciaNueva.setText(resourceMap.getString("cbExcentoTenenciaNueva.text")); // NOI18N
        cbExcentoTenenciaNueva.setName("cbExcentoTenenciaNueva"); // NOI18N
        cbExcentoTenenciaNueva.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbExcentoTenenciaNuevaItemStateChanged(evt);
            }
        });

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        txtNuevoAdeudo.setText(resourceMap.getString("txtNuevoAdeudo.text")); // NOI18N
        txtNuevoAdeudo.setName("txtNuevoAdeudo"); // NOI18N

        jpCostoNuevaTenencia.setName("jpCostoNuevaTenencia"); // NOI18N
        jpCostoNuevaTenencia.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N
        jpCostoNuevaTenencia.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -1, -1));

        jdcNuevaFechaPago.setName("jdcNuevaFechaPago"); // NOI18N
        jpCostoNuevaTenencia.add(jdcNuevaFechaPago, new org.netbeans.lib.awtextra.AbsoluteConstraints(89, 11, 108, -1));

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N
        jpCostoNuevaTenencia.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 68, -1, -1));

        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N
        jpCostoNuevaTenencia.add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 131, -1, -1));

        txtNuevoCosto.setText(resourceMap.getString("txtNuevoCosto.text")); // NOI18N
        txtNuevoCosto.setName("txtNuevoCosto"); // NOI18N
        jpCostoNuevaTenencia.add(txtNuevoCosto, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 65, 69, -1));

        txtNuevoDescuento.setText(resourceMap.getString("txtNuevoDescuento.text")); // NOI18N
        txtNuevoDescuento.setName("txtNuevoDescuento"); // NOI18N
        jpCostoNuevaTenencia.add(txtNuevoDescuento, new org.netbeans.lib.awtextra.AbsoluteConstraints(69, 128, 79, -1));

        javax.swing.GroupLayout jpDatosNuevaTenenciaLayout = new javax.swing.GroupLayout(jpDatosNuevaTenencia);
        jpDatosNuevaTenencia.setLayout(jpDatosNuevaTenenciaLayout);
        jpDatosNuevaTenenciaLayout.setHorizontalGroup(
            jpDatosNuevaTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosNuevaTenenciaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpDatosNuevaTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbExcentoTenenciaNueva)
                    .addGroup(jpDatosNuevaTenenciaLayout.createSequentialGroup()
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtNuevoAdeudo, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)
                .addComponent(jpCostoNuevaTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18))
        );
        jpDatosNuevaTenenciaLayout.setVerticalGroup(
            jpDatosNuevaTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosNuevaTenenciaLayout.createSequentialGroup()
                .addGroup(jpDatosNuevaTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDatosNuevaTenenciaLayout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addComponent(cbExcentoTenenciaNueva)
                        .addGap(39, 39, 39)
                        .addGroup(jpDatosNuevaTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel18)
                            .addComponent(txtNuevoAdeudo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jpDatosNuevaTenenciaLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jpCostoNuevaTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(75, Short.MAX_VALUE))
        );

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel12.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel12.border.titleFont"))); // NOI18N
        jPanel12.setName("jPanel12"); // NOI18N

        btnNuevaTenencia.setText(resourceMap.getString("btnNuevaTenencia.text")); // NOI18N
        btnNuevaTenencia.setName("btnNuevaTenencia"); // NOI18N
        btnNuevaTenencia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevaTenenciaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 219, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addGap(73, 73, 73)
                    .addComponent(btnNuevaTenencia)
                    .addContainerGap(75, Short.MAX_VALUE)))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 84, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup()
                    .addGap(30, 30, 30)
                    .addComponent(btnNuevaTenencia)
                    .addContainerGap(31, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jpDatosNuevaTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(67, 67, 67)
                        .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(163, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jpDatosNuevaTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(97, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(196, Short.MAX_VALUE)
                .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(208, 208, 208))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel7.TabConstraints.tabTitle"), jPanel7); // NOI18N

        jPanel9.setName("jPanel9"); // NOI18N

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel6.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel6.border.titleFont"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jtTenencias.setCellSelectionEnabled(true);
        jtTenencias.setName("jtTenencias"); // NOI18N
        jtTenencias.getTableHeader().setReorderingAllowed(false);

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listTenencias, jtTenencias);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${idTenencia}"));
        columnBinding.setColumnName("Id Tenencia");
        columnBinding.setColumnClass(Integer.class);
        columnBinding.setEditable(false);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jtTenencias.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtTenenciasMouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(jtTenencias);
        jtTenencias.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jtTenencias.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jtTenencias.columnModel.title0")); // NOI18N

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(47, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jpDatosTenencia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpDatosTenencia.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpDatosTenencia.border.titleFont"))); // NOI18N
        jpDatosTenencia.setName("jpDatosTenencia"); // NOI18N

        cbExcento.setText(resourceMap.getString("cbExcento.text")); // NOI18N
        cbExcento.setName("cbExcento"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.exento}"), cbExcento, org.jdesktop.beansbinding.BeanProperty.create("selected"));
        bindingGroup.addBinding(binding);

        cbExcento.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbExcentoItemStateChanged(evt);
            }
        });

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        txtAdeudo.setName("txtAdeudo"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.adeudos}"), txtAdeudo, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jpCostoTenencia.setName("jpCostoTenencia"); // NOI18N
        jpCostoTenencia.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N
        jpCostoTenencia.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 22, -1, -1));

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N
        jpCostoTenencia.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 76, -1, -1));

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N
        jpCostoTenencia.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 128, -1, -1));

        jdFechaPago.setName("jdFechaPago"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.fechaPago}"), jdFechaPago, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        jpCostoTenencia.add(jdFechaPago, new org.netbeans.lib.awtextra.AbsoluteConstraints(89, 22, 92, -1));

        txtCosto.setName("txtCosto"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.costo}"), txtCosto, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jpCostoTenencia.add(txtCosto, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 70, 49, -1));

        txtDescuento.setName("txtDescuento"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.descuento}"), txtDescuento, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jpCostoTenencia.add(txtDescuento, new org.netbeans.lib.awtextra.AbsoluteConstraints(69, 125, 47, -1));

        javax.swing.GroupLayout jpDatosTenenciaLayout = new javax.swing.GroupLayout(jpDatosTenencia);
        jpDatosTenencia.setLayout(jpDatosTenenciaLayout);
        jpDatosTenenciaLayout.setHorizontalGroup(
            jpDatosTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosTenenciaLayout.createSequentialGroup()
                .addGroup(jpDatosTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cbExcento)
                    .addGroup(jpDatosTenenciaLayout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtAdeudo, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 83, Short.MAX_VALUE)
                .addComponent(jpCostoTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jpDatosTenenciaLayout.setVerticalGroup(
            jpDatosTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosTenenciaLayout.createSequentialGroup()
                .addGroup(jpDatosTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDatosTenenciaLayout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addComponent(cbExcento)
                        .addGap(18, 18, 18)
                        .addGroup(jpDatosTenenciaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(txtAdeudo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jpDatosTenenciaLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jpCostoTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(113, Short.MAX_VALUE))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel8.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel8.border.titleFont"))); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N

        btnEliminarTenencia.setAction(actionMap.get("eliminarTenencia")); // NOI18N
        btnEliminarTenencia.setText(resourceMap.getString("btnEliminarTenencia.text")); // NOI18N
        btnEliminarTenencia.setName("btnEliminarTenencia"); // NOI18N

        btnGuardarTenencia.setAction(actionMap.get("guardaTenencia")); // NOI18N
        btnGuardarTenencia.setText(resourceMap.getString("btnGuardarTenencia.text")); // NOI18N
        btnGuardarTenencia.setName("btnGuardarTenencia"); // NOI18N

        btnRefreshTenencia.setAction(actionMap.get("refreshTenencia")); // NOI18N
        btnRefreshTenencia.setText(resourceMap.getString("btnRefreshTenencia.text")); // NOI18N
        btnRefreshTenencia.setName("btnRefreshTenencia"); // NOI18N

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addComponent(btnGuardarTenencia))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(41, 41, 41)
                        .addComponent(btnEliminarTenencia))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(btnRefreshTenencia)))
                .addContainerGap(25, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(btnEliminarTenencia)
                .addGap(18, 18, 18)
                .addComponent(btnGuardarTenencia)
                .addGap(18, 18, 18)
                .addComponent(btnRefreshTenencia)
                .addContainerGap(29, Short.MAX_VALUE))
        );

        cboTenenciaAuto.setEnabled(false);
        cboTenenciaAuto.setName("cboTenenciaAuto"); // NOI18N
        cboTenenciaAuto.setRenderer(renderAutomovil1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listAutos, cboTenenciaAuto);
        jComboBoxBinding.setSourceNullValue(null);
        jComboBoxBinding.setSourceUnreadableValue(null);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.auto}"), cboTenenciaAuto, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jpTarjeta.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpTarjeta.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpTarjeta.border.titleFont"))); // NOI18N
        jpTarjeta.setName("jpTarjeta"); // NOI18N

        cboTarjeta.setName("cboTarjeta"); // NOI18N

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedElement.tarjetaCircList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtTenencias, eLProperty, cboTarjeta);
        bindingGroup.addBinding(jComboBoxBinding);

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        jdcVig_Fin.setName("jdcVig_Fin"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboTarjeta, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.vigenciaFin}"), jdcVig_Fin, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        jdcVig_ini.setName("jdcVig_ini"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboTarjeta, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.vigenciaIni}"), jdcVig_ini, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        btnAgregarTarjeta.setText(resourceMap.getString("btnAgregarTarjeta.text")); // NOI18N
        btnAgregarTarjeta.setName("btnAgregarTarjeta"); // NOI18N
        btnAgregarTarjeta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarTarjetaActionPerformed(evt);
            }
        });

        btnEliminartarjeta.setText(resourceMap.getString("btnEliminartarjeta.text")); // NOI18N
        btnEliminartarjeta.setName("btnEliminartarjeta"); // NOI18N
        btnEliminartarjeta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminartarjetaActionPerformed(evt);
            }
        });

        btnActualizarTarjeta.setText(resourceMap.getString("btnActualizarTarjeta.text")); // NOI18N
        btnActualizarTarjeta.setName("btnActualizarTarjeta"); // NOI18N
        btnActualizarTarjeta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualizarTarjetaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpTarjetaLayout = new javax.swing.GroupLayout(jpTarjeta);
        jpTarjeta.setLayout(jpTarjetaLayout);
        jpTarjetaLayout.setHorizontalGroup(
            jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpTarjetaLayout.createSequentialGroup()
                .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpTarjetaLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cboTarjeta, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpTarjetaLayout.createSequentialGroup()
                                .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jpTarjetaLayout.createSequentialGroup()
                                        .addComponent(jLabel25)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jdcVig_Fin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jpTarjetaLayout.createSequentialGroup()
                                        .addComponent(jLabel24)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jdcVig_ini, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 65, Short.MAX_VALUE)
                                .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnAgregarTarjeta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(btnActualizarTarjeta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpTarjetaLayout.createSequentialGroup()
                        .addGap(234, 234, 234)
                        .addComponent(btnEliminartarjeta, javax.swing.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jpTarjetaLayout.setVerticalGroup(
            jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpTarjetaLayout.createSequentialGroup()
                .addComponent(cboTarjeta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpTarjetaLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpTarjetaLayout.createSequentialGroup()
                                .addComponent(jLabel24)
                                .addGap(31, 31, 31))
                            .addGroup(jpTarjetaLayout.createSequentialGroup()
                                .addComponent(jdcVig_ini, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(25, 25, 25)))
                        .addGroup(jpTarjetaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jdcVig_Fin, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.LEADING)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpTarjetaLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(btnAgregarTarjeta)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnActualizarTarjeta)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEliminartarjeta)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        cboTenenciaProp.setEnabled(false);
        cboTenenciaProp.setName("cboTenenciaProp"); // NOI18N
        cboTenenciaProp.setRenderer(renderPropietarioAuto1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPropietarios, cboTenenciaProp);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboTenenciaAuto, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.propietario}"), cboTenenciaProp, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel9Layout.createSequentialGroup()
                                .addComponent(jLabel22)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cboTenenciaAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel9Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel23)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cboTenenciaProp, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addComponent(jpTarjeta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jpDatosTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(160, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel22)
                            .addComponent(cboTenenciaAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel23)
                            .addComponent(cboTenenciaProp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jpTarjeta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(23, 23, 23)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jpDatosTenencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel9.TabConstraints.tabTitle"), jPanel9); // NOI18N

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 886, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane2)
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel5.TabConstraints.tabTitle"), jPanel5); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 891, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING)
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void cbExcentoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbExcentoItemStateChanged
        if(cbExcento.isSelected()) {
            jpCostoTenencia.setVisible(false);
            limpiarCT();} else{
            jpCostoTenencia.setVisible(true);}
}//GEN-LAST:event_cbExcentoItemStateChanged

    private void btnNuevaTenenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevaTenenciaActionPerformed
        
        if(cbExcentoTenenciaNueva.isSelected() == true)
        {
            at.insertarTenencia(Integer.parseInt(idAuto), null, 0, 0, true,Integer.parseInt(txtNuevoAdeudo.getText()));
            refreshTablaTenencias();
        }
        else
        {
            at.insertarTenencia(Integer.parseInt(idAuto), jdcNuevaFechaPago.getDate(), Double.parseDouble(txtNuevoCosto.getText()), Double.parseDouble(txtNuevoDescuento.getText()), false,Integer.parseInt(txtNuevoAdeudo.getText()));
            refreshTablaTenencias();
        }
    }//GEN-LAST:event_btnNuevaTenenciaActionPerformed

    private void cbExcentoTenenciaNuevaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbExcentoTenenciaNuevaItemStateChanged
        if(cbExcentoTenenciaNueva.isSelected())
            jpCostoNuevaTenencia.setVisible(false);
        else
            jpCostoNuevaTenencia.setVisible(true);
    }//GEN-LAST:event_cbExcentoTenenciaNuevaItemStateChanged

    private void cboAutosRegistradosItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboAutosRegistradosItemStateChanged
          idAuto = evt.getItem().toString();
          idAuto = idAuto.substring(idAuto.indexOf('=')+1,idAuto.indexOf(']'));
    }//GEN-LAST:event_cboAutosRegistradosItemStateChanged

    private void btnAgregarTarjetaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarTarjetaActionPerformed
        
        at.insertarTarjeta(Integer.parseInt(txtIdTenencia.getText()), jdcVig_ini.getDate(),
                jdcVig_Fin.getDate(),btnAgregarTarjeta,btnActualizarTarjeta,btnEliminartarjeta);
        refreshTablaTenencias();
        refreshTablaTenencias();
        jpTarjeta.setVisible(false);
        //JOptionPane.showMessageDialog(null, txtIdTarjeta.getText());
    }//GEN-LAST:event_btnAgregarTarjetaActionPerformed

    private void jtTenenciasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtTenenciasMouseClicked
       if(cboTarjeta.getSelectedIndex() == -1 && jtTenencias.getSelectedRowCount() == 1)
        {

            try {
                    int resp = JOptionPane.showConfirmDialog(null, "¿Deseas Agregar la Tarjeta de Circulacion?","Aviso",
                            JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null);
                    if (resp == JOptionPane.YES_NO_OPTION)
                    {
                        //jdcVig_ini.setDate(null); jdcVig_Fin.setDate(null);
                        jpTarjeta.setVisible(true);
                        btnAgregarTarjeta.setEnabled(true);
                        btnActualizarTarjeta.setEnabled(false);
                        btnEliminartarjeta.setEnabled(false);
                    }
                    else { jpTarjeta.setVisible(false); }
                    }
                     catch(Exception e)
                    {
                        JOptionPane.showMessageDialog(null,e.getMessage());
                    }
        }
       else if (cboTarjeta.getSelectedIndex() > -1 && jtTenencias.getSelectedRowCount() == 1)
       {
           jpTarjeta.setVisible(true);
           btnAgregarTarjeta.setEnabled(false);
           btnActualizarTarjeta.setEnabled(true);
           btnEliminartarjeta.setEnabled(true);
       }
    }//GEN-LAST:event_jtTenenciasMouseClicked

    private void btnEliminartarjetaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminartarjetaActionPerformed
        //btnActualizarTarjeta.setEnabled(false);
        //btnEliminartarjeta.setEnabled(false);
        //btnAgregarTarjeta.setEnabled(true);
        at.eliminarTarjeta(Integer.parseInt(txtIdTarjeta.getText()));
        refreshTablaTenencias();
        refreshTablaTenencias();
        jpTarjeta.setVisible(false);
    }//GEN-LAST:event_btnEliminartarjetaActionPerformed

    private void btnActualizarTarjetaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarTarjetaActionPerformed
        at.actualizarTarjeta(Integer.parseInt(txtIdTarjeta.getText()), jdcVig_ini.getDate(), jdcVig_Fin.getDate());
    }//GEN-LAST:event_btnActualizarTarjetaActionPerformed

    //*********************************AGREGAR********************************************/////
    //////////////////////////////////PROPIETARIO///////////////////////////////////////////////
    @Action
    public void agregarPropietario()
    {
        try {
        Propietario nuevoPropietario = new Propietario();
        emTenencias.persist(nuevoPropietario);
        listPropietarios.add(nuevoPropietario);
        int fila = listPropietarios.size() - 1;
        jtPropietarios.setRowSelectionInterval(fila, fila);
        jtPropietarios.scrollRectToVisible(jtPropietarios.getCellRect(fila, 0, true));
        setNecesitaGuardarPropietario(true);
        }
        catch (Exception e) {
        JOptionPane.showMessageDialog(null, e.getMessage());
        setNecesitaGuardarPropietario(false);
        }
    }
    //////////////////////////////////AUTOMOVIL///////////////////////////////////////////////
     @Action
    public void agregarAuto()
    {
         try {
        Auto nuevoAuto = new Auto();
        emTenencias.persist(nuevoAuto);
        listAutos.add(nuevoAuto);
        int fila = listAutos.size() - 1;
        jtAutomoviles.setRowSelectionInterval(fila, fila);
        jtAutomoviles.scrollRectToVisible(jtAutomoviles.getCellRect(fila, 0, true));
        setNecesitaGuardarAuto(true);
        }
        catch (Exception e) {
        JOptionPane.showMessageDialog(null, e.getMessage());
        setNecesitaGuardarAuto(false);
        }
    }
    //*********************************ELIMINAR********************************************/////
    //////////////////////////////////PROPIETARIO///////////////////////////////////////////////
    @Action(enabledProperty = "propietarioSeleccionado")
    public void eliminarPropieatario()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion del Registro?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        int[] seleccionados = jtPropietarios.getSelectedRows();
        List<Propietario> eliminados = new ArrayList<Propietario>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Propietario propietario = listPropietarios.get(jtPropietarios.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(propietario);
            emTenencias.remove(propietario);
        }
        listPropietarios.removeAll(eliminados);
        setNecesitaGuardarPropietario(true);
        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,e.getMessage());
        }
    }
    public boolean isPropietarioSeleccionado() {
        return jtPropietarios.getSelectedRow() != -1;
    }
    //////////////////////////////////AUTOMOVIL///////////////////////////////////////////////
    @Action(enabledProperty = "autoSeleccionado")
    public void eliminarAuto()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion del Registro?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        int[] seleccionados = jtAutomoviles.getSelectedRows();
        List<Auto> eliminados = new ArrayList<Auto>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Auto auto = listAutos.get(jtAutomoviles.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(auto);
            emTenencias.remove(auto);
        }
        listAutos.removeAll(eliminados);
        setNecesitaGuardarAuto(true);
        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,e.getMessage());
        }
    }
    public boolean isAutoSeleccionado() {
        return jtAutomoviles.getSelectedRow() != -1;
    }
    //////////////////////////////////TENENCIA///////////////////////////////////////////////
    @Action(enabledProperty = "tenenciaSeleccionada")
    public void eliminarTenencia()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion del Registro?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        int[] seleccionados = jtTenencias.getSelectedRows();
        List<Tenencia> eliminados = new ArrayList<Tenencia>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Tenencia tene = listTenencias.get(jtTenencias.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(tene);
            emTenencias.remove(tene);
        }
        listTenencias.removeAll(eliminados);
        jpTarjeta.setVisible(false);
        setNecesitaGuardarTenencia(true);
        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,e.getMessage());
        }
    }
    public boolean isTenenciaSeleccionada() {
        return jtTenencias.getSelectedRow() != -1;
    }
    //*********************************GUARDAR********************************************/////
    //////////////////////////////////PROPIETARIO///////////////////////////////////////////////
    @Action(enabledProperty = "necesitaGuardarPropietario")
    public Task guardarPropietario()
    {
        return new GuardarPropietarioTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarPropietarioTask extends org.jdesktop.application.Task<Object, Void> {
        GuardarPropietarioTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarPropietarioTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emTenencias.getTransaction().commit();
              emTenencias.getTransaction().begin();
              n = true;
           }else{
               n=false;}
           }
           catch (RollbackException e)
           {
                emTenencias.getTransaction().begin();
                List<Propietario> listaP = new ArrayList<Propietario>(listPropietarios.size());
                for(Propietario propietario : listPropietarios){
                    listaP.add(emTenencias.merge(propietario));
           }
           listPropietarios.clear();
           listPropietarios.addAll(listaP);
           }
           return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
           if(n==true)
            {
            setNecesitaGuardarPropietario(false);}
            else
            {
                setNecesitaGuardarPropietario(true);}
        }
    }
    private boolean necesitaGuardarPropietario = false;
    public boolean isNecesitaGuardarPropietario() {
        return necesitaGuardarPropietario;
    }
    public void setNecesitaGuardarPropietario(boolean b) {
        boolean old = isNecesitaGuardarPropietario();
        this.necesitaGuardarPropietario = b;
        firePropertyChange("necesitaGuardarPropietario", old, isNecesitaGuardarPropietario());
    }
    //////////////////////////////////AUTOMOVIL///////////////////////////////////////////////
    @Action(enabledProperty = "necesitaGuardarAuto")
    public Task guardarAuto()
    {
        return new GuardarAutoTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarAutoTask extends org.jdesktop.application.Task<Object, Void> {
        GuardarAutoTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarAutoTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emTenencias.getTransaction().commit();
              emTenencias.getTransaction().begin();
              n2 = true;
           }else{
               n2=false;}
           }
           catch (RollbackException e)
           {
                emTenencias.getTransaction().begin();
                List<Auto> listaA = new ArrayList<Auto>(listAutos.size());
                for(Auto auto : listAutos){
                    listaA.add(emTenencias.merge(auto));
           }
           listAutos.clear();
           listAutos.addAll(listaA);
           }
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            if(n2==true)
            {
            setNecesitaGuardarAuto(false); refreshTablaProp(); refreshTablaAuto();}
            else
            {
                setNecesitaGuardarAuto(true);}
        }
    }
    private boolean necesitaGuardarAuto = false;
    public boolean isNecesitaGuardarAuto() {
        return necesitaGuardarAuto;
    }
    public void setNecesitaGuardarAuto(boolean b) {
        boolean old = isNecesitaGuardarAuto();
        this.necesitaGuardarAuto = b;
        firePropertyChange("necesitaGuardarAuto", old, isNecesitaGuardarAuto());
    }
    //////////////////////////////////TENENCIA///////////////////////////////////////////////
     @Action(enabledProperty = "necesitaGuardarTenencia")
    public Task guardaTenencia()
    {
        return new GuardaTenenciaTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardaTenenciaTask extends org.jdesktop.application.Task<Object, Void> {
        GuardaTenenciaTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardaTenenciaTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emTenencias.getTransaction().commit();
              emTenencias.getTransaction().begin();
              n3 = true;
           }else{
               n3=false;}
           }
           catch (RollbackException e)
           {
                emTenencias.getTransaction().begin();
                List<Tenencia> listaT = new ArrayList<Tenencia>(listTenencias.size());
                for(Tenencia tene : listTenencias){
                    listaT.add(emTenencias.merge(tene));
           }
           listTenencias.clear();
           listTenencias.addAll(listaT);
           }
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
           if(n3==true)
            {
            setNecesitaGuardarTenencia(false); refreshTablaTenencias();}
            else
            {
                setNecesitaGuardarTenencia(true);}
        }
    }
    private boolean necesitaGuardarTenencia = false;
    public boolean isNecesitaGuardarTenencia() {
        return necesitaGuardarTenencia;
    }
    public void setNecesitaGuardarTenencia(boolean b) {
        boolean old = isNecesitaGuardarTenencia();
        this.necesitaGuardarTenencia = b;
        firePropertyChange("necesitaGuardarTenencia", old, isNecesitaGuardarTenencia());
    }
    //*********************************REFRESH********************************************/////
    //////////////////////////////////PROPIETARIO///////////////////////////////////////////////
    @Action
    public Task refreshPropietario() {
        return new RefreshPropietarioTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class RefreshPropietarioTask extends org.jdesktop.application.Task<Object, Void> {
        RefreshPropietarioTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to RefreshPropietarioTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
           emTenencias.getTransaction().rollback();
            emTenencias.getTransaction().begin();
            List<Propietario> listaP = queryPropietarios.getResultList();
            for(Propietario propietario : listaP){
                emTenencias.refresh(propietario);
            }
            listPropietarios.clear();
            listPropietarios.addAll(listaP);
            return null;
        }
        @Override protected void succeeded(Object result) {
            setNecesitaGuardarPropietario(false);
        }
    }
    //////////////////////////////////AUTOMOVIL///////////////////////////////////////////////
    @Action
    public Task refreshAuto()
    {
        return new RefreshAutoTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class RefreshAutoTask extends org.jdesktop.application.Task<Object, Void> {
        RefreshAutoTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to RefreshAutoTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            emTenencias.getTransaction().rollback();
            emTenencias.getTransaction().begin();
            List<Auto> listaA = queryAutos.getResultList();
            for(Auto auto : listaA){
                emTenencias.refresh(auto);
            }
            listAutos.clear();
            listAutos.addAll(listaA);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            setNecesitaGuardarAuto(false);
        }
    }
    //////////////////////////////////TENENCIA///////////////////////////////////////////////
    @Action
    public Task refreshTenencia()
    {
        return new RefreshTenenciaTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class RefreshTenenciaTask extends org.jdesktop.application.Task<Object, Void> {
        RefreshTenenciaTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to RefreshTenenciaTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
           emTenencias.getTransaction().rollback();
            emTenencias.getTransaction().begin();
            List<Tenencia> listaT = queryTenencias.getResultList();
            for(Tenencia tene : listaT){
                emTenencias.refresh(tene);
            }
            listTenencias.clear();
            listTenencias.addAll(listaT);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            setNecesitaGuardarTenencia(false);
        }
    }
    //*********************************LISTENERS********************************************/////
    private void initListenersPaciente()
    {
        jtPropietarios.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("propietarioSeleccionado", !isPropietarioSeleccionado(), isPropietarioSeleccionado());
                jpDatosPropietario.setVisible((jtPropietarios.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesitaGuardarPropietario(true);
            }
        });
    }
    private void initListenersAuto()
    {
        jtAutomoviles.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("autoSeleccionado", !isAutoSeleccionado(), isAutoSeleccionado());
                jpDatosAuto.setVisible((jtAutomoviles.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesitaGuardarAuto(true);
            }
        });
    }
    private void initListenersTenencia()
    {
        jtTenencias.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("tenenciaSeleccionada", !isTenenciaSeleccionada(), isTenenciaSeleccionada());
                jpDatosTenencia.setVisible((jtTenencias.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesitaGuardarTenencia(true);
            }
        });
    }
    //*********************************Metodos********************************************/////
    private void validadorNumeros(JTextField jtf)
    {
        jtf.addKeyListener(new KeyAdapter() {
        public void keyTyped(KeyEvent e) {
        char c = e.getKeyChar();
        if (!(Character.isDigit(c) ||
        (c == KeyEvent.VK_BACK_SPACE) ||
        (c == KeyEvent.VK_DELETE))) {
        getToolkit().beep();
        e.consume();
        }
        }
        });
    }
    private void comboboxIndex()
    {
        cboGeneros.setSelectedIndex(-1);
        cboPropietarioAuto.setSelectedIndex(-1);
        cboPropietariosAuto.setSelectedIndex(-1);
    }
    private void panelesVisibles()
    {
        jpDatosPropietario.setVisible(false);
        jpDatosAuto.setVisible(false);
        cboTarjeta.setVisible(false);
        jpTarjeta.setVisible(false);
    }
    private void limpiarCT()
    {
        jdFechaPago.setDate(null);
        txtCosto.setText("");
        txtDescuento.setText("");
    }
    private void refreshTablaTenencias()
    {
            emTenencias.getTransaction().rollback();
            emTenencias.getTransaction().begin();
            List<Tenencia> listaT = queryTenencias.getResultList();
            for(Tenencia tene : listaT){
                emTenencias.refresh(tene);
            }
            listTenencias.clear();
            listTenencias.addAll(listaT);
            jpTarjeta.setVisible(false);
            setNecesitaGuardarTenencia(false);
    }
    private void refreshTablaProp()
    {
            emTenencias.getTransaction().rollback();
            emTenencias.getTransaction().begin();
            List<Propietario> listaP = queryPropietarios.getResultList();
            for(Propietario propietario : listaP){
                emTenencias.refresh(propietario);
            }
            listPropietarios.clear();
            listPropietarios.addAll(listaP);
            jpDatosPropietario.setVisible(false);
            setNecesitaGuardarPropietario(false);
    }
    private void refreshTablaAuto()
    {
            emTenencias.getTransaction().rollback();
            emTenencias.getTransaction().begin();
            List<Auto> listaA = queryAutos.getResultList();
            for(Auto auto : listaA){
                emTenencias.refresh(auto);
            }
            listAutos.clear();
            listAutos.addAll(listaA);
            jpDatosAuto.setVisible(false);
            setNecesitaGuardarAuto(false);
    }
    private void botonesHabilitados()
    {
        setNecesitaGuardarPropietario(false);
        setNecesitaGuardarAuto(false);
        setNecesitaGuardarTenencia(false);

    }



    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizarTarjeta;
    private javax.swing.JButton btnAgregarAuto;
    private javax.swing.JButton btnAgregarPropietario;
    private javax.swing.JButton btnAgregarTarjeta;
    private javax.swing.JButton btnEliminarAuto;
    private javax.swing.JButton btnEliminarPropietario;
    private javax.swing.JButton btnEliminarTenencia;
    private javax.swing.JButton btnEliminartarjeta;
    private javax.swing.JButton btnGuardarAuto;
    private javax.swing.JButton btnGuardarPropietario;
    private javax.swing.JButton btnGuardarTenencia;
    private javax.swing.JButton btnNuevaTenencia;
    private javax.swing.JButton btnRefreshAuto;
    private javax.swing.JButton btnRefreshPropietario;
    private javax.swing.JButton btnRefreshTenencia;
    private javax.swing.JCheckBox cbExcento;
    private javax.swing.JCheckBox cbExcentoTenenciaNueva;
    private javax.swing.JComboBox cboAutosRegistrados;
    private javax.swing.JComboBox cboGeneros;
    private javax.swing.JComboBox cboPropietarioAuto;
    private javax.swing.JComboBox cboPropietariosAuto;
    private javax.swing.JComboBox cboTTT;
    private javax.swing.JComboBox cboTarjeta;
    private javax.swing.JComboBox cboTenenciaAuto;
    private javax.swing.JComboBox cboTenenciaProp;
    private javax.persistence.EntityManager emTenencias;
    private java.util.List<bd_tenencias.Generos> generosList;
    private javax.persistence.Query generosQuery;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTextField jTextField1;
    private com.toedter.calendar.JDateChooser jdFechaPago;
    private com.toedter.calendar.JDateChooser jdcNuevaFechaPago;
    private com.toedter.calendar.JDateChooser jdcVig_Fin;
    private com.toedter.calendar.JDateChooser jdcVig_ini;
    private javax.swing.JPanel jpAccionesPropietario;
    private javax.swing.JPanel jpCostoNuevaTenencia;
    private javax.swing.JPanel jpCostoTenencia;
    private javax.swing.JPanel jpDatosAuto;
    private javax.swing.JPanel jpDatosNuevaTenencia;
    private javax.swing.JPanel jpDatosPropietario;
    private javax.swing.JPanel jpDatosTenencia;
    private javax.swing.JPanel jpPropietarios;
    private javax.swing.JPanel jpTarjeta;
    private javax.swing.JTable jtAutomoviles;
    private javax.swing.JTable jtPropietarios;
    private javax.swing.JTable jtTenencias;
    private java.util.List<Auto> listAutos;
    private java.util.List<Propietario> listPropietarios;
    private java.util.List<Tenencia> listTenencias;
    private javax.persistence.Query queryAutos;
    private javax.persistence.Query queryPropietarios;
    private javax.persistence.Query queryTenencias;
    private UtilidadesTenencias.RenderAutomovil renderAutomovil1;
    private Utilidades.RenderGeneros renderGeneros1;
    private UtilidadesTenencias.RenderPropietarioAuto renderPropietarioAuto1;
    private UtilidadesTenencias.RendererGenerosPropietarios rendererGenerosPropietarios1;
    private javax.swing.JTextField txtAdeudo;
    private javax.swing.JTextField txtAnio;
    private javax.swing.JTextField txtCilindro;
    private javax.swing.JTextField txtCosto;
    private javax.swing.JTextField txtDescuento;
    private javax.swing.JTextField txtDireccion;
    private javax.swing.JTextField txtIdTarjeta;
    private javax.swing.JTextField txtIdTenencia;
    private javax.swing.JTextField txtMotor;
    private javax.swing.JTextField txtNuevoAdeudo;
    private javax.swing.JTextField txtNuevoCosto;
    private javax.swing.JTextField txtNuevoDescuento;
    private javax.swing.JTextField txtPrecioAutoTenencia;
    private javax.swing.JTextField txtPuertas;
    private javax.swing.JTextField txtSerie;
    private javax.swing.JTextField txtTelefono;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
